Manages the recorded fonts [WIP]. More...
Public Member Functions | |
| Font * | getDefaultFont () const |
| System * | getSystem () const |
| Font * | createOrRetrieve (nkMemory::StringView name) |
| Font * | record (nkMemory::StringView name, nkMemory::UniquePtr< Font > resource) |
| Font * | get (nkMemory::StringView name) const |
| Font * | getByIndex (unsigned int index) const |
| void | rename (nkMemory::StringView oldName, nkMemory::StringView newName) |
| void | erase (nkMemory::StringView name) |
| nkMemory::UniquePtr< Font > | relinquish (nkMemory::StringView name) |
Manages the recorded fonts [WIP].
This is a WIP.
| Font* nkWinUi::FontManager::getDefaultFont | ( | ) | const |
| System* nkWinUi::FontManager::getSystem | ( | ) | const |
| Font* nkWinUi::FontManager::createOrRetrieve | ( | nkMemory::StringView | name | ) |
Creates if unavailable, or retrieves if available, a font.
| name | The name of the font to retrieve. |
| Font* nkWinUi::FontManager::record | ( | nkMemory::StringView | name, |
| nkMemory::UniquePtr< Font > | resource | ||
| ) |
Records an already existing resource in the manager, passing its ownership around.
| name | The name under which the resource should be recorded. |
| resource | The resource to record. |
| Font* nkWinUi::FontManager::get | ( | nkMemory::StringView | name | ) | const |
Retrieves a font.
| name | The name of the font to retrieve. |
| Font* nkWinUi::FontManager::getByIndex | ( | unsigned int | index | ) | const |
Get a font, by index. Note that one index can map to a different font after memory is changed. Useful to loop over all available fonts in one go.
| index | The index of the font to retrieve. |
| void nkWinUi::FontManager::rename | ( | nkMemory::StringView | oldName, |
| nkMemory::StringView | newName | ||
| ) |
Renames a font.
| oldName | The name of the font to rename. |
| newName | The name to reassign to the font. |
| void nkWinUi::FontManager::erase | ( | nkMemory::StringView | name | ) |
Erases and frees a font.
| name | The name of the font to erase. |
| nkMemory::UniquePtr<Font> nkWinUi::FontManager::relinquish | ( | nkMemory::StringView | name | ) |
Requests the manager to relinquish the ownership of a resource and pass it around.
| name | The name of the recorded resource to relinquish. |